﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CEC14Lib
{
    public class CEC14func
    {
        private TestFunc instance;

        public CEC14func(int dim, int funcNum)
        {
            instance = new TestFunc(dim);

            double[] temp = new double[dim]; //

            instance.test_func(temp, new double[1], dim, 1, funcNum); //
        }

        public double FEval(double[] input, int dim, int funcNum)
        {
            double[] fEvalArr = new double[1];

            instance.test_func(input, fEvalArr, dim, 1, funcNum);

            return fEvalArr[0];
        }
    }
}
